<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>第一题</title>
</head>

<body>
    <script>
        let obj = [
            { uname: '张三', score: 90, status: '1' },
            { uname: '李四', score: 10, status: '3' },
            { uname: '王五', score: 70, status: '2' },
        ]
        let newobj = {
            1: '优秀',
            2: '良好',
            3: '差劲',
        }
        function getScore() {
            obj.map(item => {
                if (item.status == 1) {
                    console.log(newobj['1'])
                    document.write(`${item.uname}  ${newobj['1']}<br>`)
                }
                if (item.status == 2) {
                    console.log(newobj['2'])
                    document.write(`${item.uname}  ${newobj['2']}<br>`)
                }
                if (item.status == 3) {
                    console.log(newobj['3'])
                    document.write(`${item.uname}  ${newobj['3']}<br>`)
                }
            })
        }
        getScore()
    </script>
</body>

</html>